package component.beanprocessor;

import entity.javabean.BeanA;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @author: ZhouBert
 * @date: 2020/8/25
 * @description:
 */
public class CircleBeanPostProcessor implements BeanPostProcessor {

	@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		return bean instanceof BeanA ? new BeanA() : bean;
	}
}
